<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:if test="orderCustomer!=null">
	<s:if test="%{#order.isVoting()}">
		<!-- 当订单状态为投票中时 -->
		<div class="box">
			<input type="button" class="btn_yellow_2" value="投票" onclick="javascript:viewOrderVote('<s:property value="#order.id"/>')">
		</div>
	</s:if>

	<div id="customerNote">
		<font class="h1"> 我提交的订单信息如下 </font>(信息已自动保存)
	</div>
	<script> jtool.flashview("customerNote");</script>
	<s:if test="#order.status.code<3">
		<ol class="notice list">
			<li>
				请检查以下你的订单信息，确定订单无误。如发现有误，可以点击“取消”，取消本次订单。
			</li>
			<li>
				订单状态变化时，将以Email的形式通知你。在订单相应状态下，你可以进行订单信息修改，或者选择我中意的商家并为其投票，最后与商家进行交易(收货和付款)。
			</li>
			<li>
				你可以在“
				<a href="<%=request.getContextPath()%>/usercenter/index.do">我的账户</a>”>"
				<a href="<%=request.getContextPath()%>/order/listTakePartInOrders.do">我参与的订单</a>"查看你参与的联购订单信息。
			</li>
		</ol>
	</s:if>
	<s:set name="orderCustomer" value="orderCustomer" />
	<div class="box_blue">
		<div class="box_title">
			我的订单的情况
		</div>
		<table style="width: 100%;" class="data_table">
			<tr>
				<th>
					商品/服务
				</th>
				<th>
					要求
				</th>
				<th align="right" width="50">
					单位数量
				</th>
				<th width="100"></th>
			</tr>
			<s:iterator value="#orderCustomer.orderRequests" id="request">
				<tr>
					<td>
						<a href="<%=request.getContextPath()%>/product/viewProduct.do?id=<s:property value="#request.product.id" />" target="_blank"> <s:property value="#request.product.name" /> </a>
					</td>
					<td>
						<s:property value="toHtml(#request.comment)" escape="false" />
					</td>
					<td align="right">
						<s:property value="#request.count" />
					</td>
					<td>

						<s:if test="%{#order.isInviting() }">
							<!-- 当订单状态为邀请中时 -->
							<input type="button" value="取消" class="btn_blue_3" onclick="javascript: cancelOrderRequest('<s:property value="#request.id"/>')">
						</s:if>
					</td>
				</tr>
			</s:iterator>
		</table>
	</div>

	<s:if test="#orderCustomer.votedVendor!=null">
		<div class="box_blue">
			<div class="box_title">
				我所选择的供应商
			</div>
			<div>
				<a href="<%=request.getContextPath()%>/company/viewVendorInfo.do?id=<s:property value="#orderCustomer.votedVendor.company.id"/>" target="_blank"> <s:property value="#orderCustomer.votedVendor.company.name" /> </a>
			</div>
		</div>
	</s:if>

	<jsp:include page="/order/include/order_customer_charge_type.jsp"></jsp:include>

	<div class="box_blue">
		<s:if test="#orderCustomer.address==null">
			<a href="<%=request.getContextPath()%>/order/selectAddress.do?orderId=<s:property value="#order.id"/>"> 设置地址 </a>
		</s:if>

		<s:else>
			<div class="box_title">
				我的订单联系地址
				<input type="button" value="更改" onclick="javascript:jtool.goto('<%=request.getContextPath()%>/order/selectAddress.do?orderId=<s:property value="#order.id"/>');" />
			</div>
			<div class="box_body">
				<s:set name="address" value="#orderCustomer.address" />
				<jsp:include page="/address/address_view_sample.jsp"></jsp:include>
			</div>
		</s:else>
	</div>
</s:if>